const rewire = require('rewire')
const mp = rewire('../common/mp.cjs')
const config = rewire('../config.cjs')

(async function() {
  const mpinfo = mp.makeMp({appid: config.mpAppID, secret: config.mpAppSecret})
  console.log(await mpinfo.getAccessToken())
  const userList = await mp.getUserList(mpinfo)
  console.log(userList)

  const openid = 'oqu4_51gsnxBwk9ffrns_uEURE0w'
  await mp.sendCustomText(mpinfo, openid, 'hello')
})()
